﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace BarManager.Core.DomainService
{
    public interface IRepository<TEntity> where TEntity : class
    {        
        IEnumerable<TEntity> Find(Expression<Func<TEntity, bool>> condition);
        IEnumerable<TEntity> GetAll();
        TEntity Get(Expression<Func<TEntity, bool>> condition);
        TEntity Create();
        void Add(TEntity entity);
        void Update(TEntity entity);
        void Delete(TEntity entity);               
    }
}
